def rdnflip(image):
    flipcode=random.randint(-1,1)
    dst=cv2.flip(image,flipcode)
    return dst
for cnt,ff in enumerate(filelist):
    path_filename=os.path.join(SRC_PATH,ff)
    image=cv2.imread(path_filename)
    if image is None:
        print("Faild to read image:",path_filename)
        continue
    dst=rdnflip(image)
    filename="{}_{:0>3d}.jpg".format("flip",cnt)
    fliped=os.path.join(DST2_PATH,filename)
    cv2.imwrite(fliped,dst)
    print("{}文件夹下共有{}个文件！".format(DST2_PATH,cnt+1))
    display_image(DST2_PATH)